package com.wwdx.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wwdx.utils.ConstantHolder;
import com.wwdx.utils.excel.ExcelCell;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 收入统计
 * @author liguoliang
 * @date 2018-03-20 11:18
 */
@Table(name = "wwdx_income")
@Entity
@Data
public class WwdxInComeModel implements Serializable{

    /**
     * 日期
     */
    @Id
    @ExcelCell(index = 1)
    @JsonFormat(pattern = ConstantHolder.Constant.LOCAL_DATE_PATTERN)
    private Date date;
    /**
     * 当天总收入
     */
    @ExcelCell(index = 2)
    private BigDecimal order_day_total;
    /**
     * 当天订购人数
     */
    @ExcelCell(index = 3)
    private Long order_day_user_count;
    /**
     * 当天订购笔数
     */
    @ExcelCell(index = 4)
    private Long order_day_count;
    /**
     * 排序字段
     */
    @Transient
    private String sort;
    /**
     * 排序方式 （desc asc）
     */
    @Transient
    private String sortOrder;
}